﻿using J.Status.Application.Command.RoomNumCommand;
using MediatR;
using StatusService;

namespace J.Status.Application.Handler.RoomNumHandler
{
    public class RoomNumDeleteHandler:IRequestHandler<RoomNumDeleteCommand,int>
    {
        private readonly IRoomNumManageService roomNumManageService;
        public RoomNumDeleteHandler(IRoomNumManageService roomNumManageService)
        {
            this.roomNumManageService = roomNumManageService;
        }

        public async Task<int> Handle(RoomNumDeleteCommand request, CancellationToken cancellationToken)
        {
            return await roomNumManageService.RoomNumDelete(request.Id);
        }
    }
}
